<script type="text/javascript">
    $(document).ready(function() {
//        alert("hello");
        $(".item_name").click(function() {
            $this.addClass('item_name_visited');
        });
    });
</script>
<div id="top">
    <div class="item_title">请选择体检机构:</div>
    <div id="item_name_main">
        <?php
        foreach ($cities as $key => $value) {
            $count = $value['count'];
            $name = $value['city'];
            echo "<a class='item_name' href='index.php?r=main/centertocity&city=" . $name . "'>" . $name . "(" . $count . ")</a>";
        }
        ?>

    </div>
</div>
<div id="main">

    <?php
    foreach ($rets->getData() as $v) {
        echo "<ul class='item_ul'><li  class='liTH'>" . $v->name . "</li><li  class='liTD'><strong>机构地址：</strong>" . $v->address . "</li><li  class='liTD'><strong>联系电话：</strong>" . $v->telephone . "</li><p class='item_details'>";
    ?>
    <a href='index.php?r=main/centerdetails/city/<?=$v->id?>'>查看详情</a></p></ul>
    <?php }?>

</div>
<div id="footer">
    <?php
    $this->widget('CLinkPager', array(
        'header' => '',
        'firstPageLabel' => '首页',
        'lastPageLabel' => '末页',
        'prevPageLabel' => '上一页',
        'nextPageLabel' => '下一页',
        'pages' => $rets->getPagination(),
        'maxButtonCount' => 10
            )
    );
    ?>

</div>

